﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using WMSSoft.Lib.Basic;
using WMSSoft.Lib.Enums;
using WMSSoft.Lib.WinKStart;
using WMSSoft.Lib.Texte;

namespace WMSSoft.Lib.WinKStart.Classes.Metadata
{
    public static class Meta_Operator
    {
        public static List<KeyValueAssignment> GetPropertyOperators()
        {
            try
            {
                List<KeyValueAssignment> tmpOperatorList = new List<KeyValueAssignment>();

                tmpOperatorList.Add(new KeyValueAssignment("", "Please choose an operator"));
                tmpOperatorList.Add(new KeyValueAssignment("-eq", LanguageStrings.GetText("Equal")));
                tmpOperatorList.Add(new KeyValueAssignment("-lt", LanguageStrings.GetText("Lower than")));
                tmpOperatorList.Add(new KeyValueAssignment("-gt", LanguageStrings.GetText("Greater than")));
                tmpOperatorList.Add(new KeyValueAssignment("-like", LanguageStrings.GetText("Like")));

                return tmpOperatorList;
            }
            catch (Exception Ex)
            {
                throw new Exception("Unable to collect Operators!", Ex);
            }
        }

        public static List<KeyValueAssignment> LogicalOperators()
        {
            try
            {
                List<KeyValueAssignment> tmpOperatorList = new List<KeyValueAssignment>();

                tmpOperatorList.Add(new KeyValueAssignment("", "Please choose an operator"));
                tmpOperatorList.Add(new KeyValueAssignment("AND", LanguageStrings.GetText("Logical And")));
                tmpOperatorList.Add(new KeyValueAssignment("OR", LanguageStrings.GetText("Logical Or")));

                return tmpOperatorList;
            }
            catch (Exception Ex)
            {
                throw new Exception("Unable to collect logical Operators!", Ex);
            }
        }
    }
}
